/**法规文件api */
import request from './request.js';
let service = request.service;
let formatterUrl = request.formatterUrl;
export default {
  /**根据orgId获取法规文件列表 */
  getFieldGuidanceList(orgId,data) {
    return service({
      url: `/adscm/zltx/maai_production/searchAllCondition/${orgId}`,
      method: 'get',
      params: data
    })
  },
  /**删除法规文件 */
  deleteFieldGuidance(orgId, data) {
    return service({
      url: `/adscm/zltx/maai_production/deleteContent/${orgId}`,
      method: 'get',
      params:data
    })
  },
  /**新增-insertContent 修改-updateContent 法规文件 */
  insertUpdateFieldGuidance(orgId,type,data) {
    return service({
      url: `/adscm/zltx/maai_production/${type}/${orgId}`,
      method: 'post',
      data
    })
  },
  /**法规文件菜单设置-查询菜单列表 */
  getSettingMenu(){
    return service({
      url: `/adscm/zltx/maai_production/selectMenu`,
      method: 'post'
    })
  },
   /**法规文件菜单设置-新增菜单 */
  addSettingMenu(data){
    return service({
      url: `/adscm/zltx/maai_production/addMenu`,
      method: 'post',
      data
    })
  },
   /**法规文件菜单设置-删除菜单 */
   deleteSettingMenu(id) {
     return service({
       url: `/adscm/zltx/maai_production/deleteMenu/${id}`,
       method: 'get'
     })
   },
   /**法规文件附件上传列表 */
   getEnclosureList(id) {
    return service({
      url: `/adscm/zltx/maaiProductionAttachment/selectByFileId/${id}`,
      method: 'get'
    })
   },
    /**法规文件附件上传接口 */
   enclosureUpload(data) {
     return service({
       url: `/adscm/zltx/maaiProductionAttachment/upload`,
       method: 'post',
       data
     }, 'upload')
   },
  /**下载法规文件附件 */
  downloadEnclosure(id) {
    return formatterUrl({
      url: `/adscm/zltx/maaiProductionAttachment/download/${id}`
    })
  },
  /**删除法规文件附件 */
  deleteEnclosure(id) {
    return service({
      url: `/adscm/zltx/maaiProductionAttachment/delete/${id}`,
      method: 'post'
    })
  },
   
}